<script setup>
const props = defineProps({
  details: {
    type: Object,
    default: () => {
      return {
        name: '',
        author: '',
        source: '',
        releaseTime: '',
        details: ''
      }
    }
  }
})
</script>

<template>
  <div class="details-content ">
    <div class="title">{{ details.name }}</div>
    <div class="desc">
      <div class="desc-item">
        <img class="desc-item-icon" src="@/assets/author.png"></img>
        <div class="desc-item-name">作者：{{ details.author }}</div>

      </div>
      <div class="desc-item">
        <img class="desc-item-icon" src="@/assets/source.png"></img>
        <div class="desc-item-name">来源：{{ details.source }}</div>
      </div>
      <div class="desc-item">
        <img class="desc-item-icon" src="@/assets/publish_time.png"></img>
        <div class="desc-item-name">发布时间：{{ details.releaseTime }}</div>
      </div>
    </div>
    <div class="desc-content" v-html="details.details"></div>
  </div>
</template>

<style scoped lang="scss">
.details-content {
  padding: 75px 15%;
  display: flex;
  flex-direction: column;
  align-items: center;
  .title {
    font-family: PingFang SC;
    font-size: 34px;
    font-weight: normal;
    line-height: 34px;
    color: #3D3D3D;
  }
  .desc {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 0 22px 0;
    .desc-item {
      display: flex;
      align-items: center;
      margin-right: 23px;
      .desc-item-icon {
        width: 15px;
        height: 15px;
        margin-right: 6px;
      }
      .desc-item-name {
        font-family: PingFang SC;
        font-size: 14px;
        font-weight: normal;
        line-height: 15.6px;
        letter-spacing: 0px;
        color: #666666;
      }
    }
  }
}
</style>